// 导入所有IFormComponents组件
import IFormInput from './IFormInput/index.vue'
import IFormLayout from './IFormLayout/index.vue'
import IFormTable from './IFormTable/index.vue'

// 组件映射
const components = {
  IFormInput,
  IFormLayout,
  IFormTable
}

export function registerComponents(app: { component: (name: string, component: unknown) => void }) {
  // 注册所有组件
  Object.keys(components).forEach(key => {
    app.component(key, components[key as keyof typeof components])
    console.log(`注册组件: ${key}`)
  })
}
